package com.itstherules.jmsunit.mock.dummy;

import java.util.Enumeration;
import java.util.Iterator;
import java.util.List;

import javax.jms.Message;

@SuppressWarnings("unchecked")
public class DummyEnumeration implements Enumeration {

	private Iterator<Message> iterator;

	public DummyEnumeration(List<Message> messages) {
		this.iterator = messages.iterator();
	}

	public boolean hasMoreElements() {
		return this.iterator.hasNext();
	}

	public Object nextElement() {
		return this.iterator.next();
	}

}
